<?php
/**
 * Created by PhpStorm.
 * User: zd
 * Date: 2018/11/29
 * Time: 10:11
 */

namespace app\api\model;


class BehaviorType extends BaseModel
{
    /**
     * 查询所有分类
     * @return mixed
     */
    public static function getAllCategory(){
        return self::where("1=1")->select();
    }

    /**
     * 获取分类
     * @param $name
     * @return array|false|\PDOStatement|string|\think\Model
     */
    public static function getCategory($name){
        return self::where('pub_name','=',$name)->find();
    }
}